<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>DOM HTML</title>
</head>
<body>
<h2>改变属性的值</h2>
<img id="myImage" src="../eg_bulboff.jpg"/>

<script>
    document.getElementById("myImage").src = "../eg_bulbon.jpg"
</script>
</body>
</html>